package com.fhz.a2102mvi.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import com.fhz.a2102mvi.entity.BannerEntity

/**
 * 时间:2023/10/19
 * @author Mr.Feng
 * 简述: TODO
 */
@Dao
interface BannerDao {

    @Query("SELECT * FROM banner")
    fun getAll(): List<BannerEntity>

//    @Query("SELECT * FROM user WHERE uid IN (:userIds)")
//    fun loadAllByIds(userIds: IntArray): List<BannerEntity>

//    @Query("SELECT * FROM banner WHERE first_name LIKE :first AND " +
//            "last_name LIKE :last LIMIT 1")
//    fun findByName(first: String, last: String): BannerEntity

    @Insert
    fun insertAll(vararg banners: BannerEntity)

    @Delete
    fun delete(banner: BannerEntity)
}